package com.hjb.service.config.exception;

import com.hjb.service.config.constant.EnumCode;

public class BusinessException extends Exception{
	private static final long serialVersionUID = 5316504046397211373L;
	private String code;
	private String desc;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public BusinessException(String code,String desc) {
		this.code = code;
		this.desc = desc;
	} 
	
	public BusinessException(EnumCode code){
		this.code = code.getCode();
		this.desc = code.getDesc();
				
	}
}
